		<script type="text/javascript">  
			var url = '<?=base_url()?>';
			var control = '<?=$cotrol;?>';
			var action = 'insert';
			var title = 'kết luận';
			var width = 380;
			var height = 350;	
			var arr_clm = [50,50,150,150,250,250,50,50,'auto'];	
			$(function() { 
			
				$('#adds').click(function(){
					window.location = url+"smsemail/insert.html";
				});
				//add(); //Them moi
				searchs(); //Search
				deleteAll();//Delete all
				getList();
			});			
			
			function func_get(){
				edit();
				deletes();
				checkall();
			}
						
			function getList(str_json,page){
				$('#gridview').html('<table class="resultset" id="grid"></table>');	
				$.ajax({					
					url: '<?=base_url()?>'+control+'/getList',	
					type: 'POST',
					data: {search:str_json,page:page},	
					success: function(data) {
					var obj = $.evalJSON(data);
					$("#paging").html(obj.paging);
					$('#grid').html(obj.content).fixheadertable({ 
							//caption : 'Loại xe', 
							colratio : arr_clm, 
							height : height, 
							width : 'auto', 
							zebra : true, 
							//sortable : true,
							sortedColId : 0, 
							resizeCol : true,
							pager : false,
							rowsPerPage	 : 10
							//sortType : ['integer','', 'string', 'string', 'string', 'string', 'date'],
							//dateFormat : 'Y/m/d'
						});
						paging(getList,page);
						if(typeof(func_get)=='function'){
							func_get(data);
						}
					}
				});
			}
			function dialogs(titles,w,type){
				$('#dialog').dialog({
					autoOpen: false,
					width: w,
					modal: true,
					title: titles,
					buttons: {
						'Lưu': function() {
								$(".names").removeClass('b-err');
								var names = $(".names").val();
								var codes = $(".codes").val();
								if(names==''){
									 $(".names").addClass('b-err'); 
									 $(".names").attr('placeholder','Tên kết luận không được trống.');
									 return false;
								}
								var id = $("#id").val();
								$.post(url+control+'/save',{str:queryInsert(),id:id},function(data){
									if(data == 1){
										getList(querySearch());
									}
									else{
										
									}
								});
								return false;		
							},
							"Huỷ": function() {
								$(this).dialog("close");
							}			
					}
				});
			}
		</script>	
		<!-- ui-dialog -->
		<div id="dialog" title="Thêm mới"></div>
        <!-- ui-dialog -->
		<!--<div class="paddingl5" style="position : relative; width:100%;">
        	<div id="boxsearch" class="fleft w100pt">
            	<div class="fleft mleft0 paddingt1">
                	<input placeholder="Tên kết luận..." id="name" class="input search h18" />
                </div>
                <div id="search" class="btn fleft mleft5"><span class="fleft icon icon-search"></span><span class="fleft">Tìm kiến</span></div>
                <div id="adds" class="btn fleft mleft5"><span class="fleft icon icon-add"></span><span class="fleft">Thêm mới</span></div>
                <div id="delete" class="btn fleft mleft5"><span class="fleft icon icon-delete"></span><span class="fleft">Xoá</span></div>
            </div>
            <div id="gridview" class="fleft w100pt" >
				<table class="resultset" id="grid"></table>
            </div>
            <div class="fleft" id="paging"></div>
            <div class="clear"></div>
		</div>-->
        <div class="paddingl5" style="position : relative; width:100%;">
        	<div class="boxinsert">
            	 <!--Row-->
                 <div class="rows">
                 	 <div class="fleft mleft5">
                     	  <input autocomplete="off" type="hidden" id="id" />
                          <label class="fleft w100 mtop5">Tên nhân viên:</label>
                          <input id="tennvcq" placeholder="Tên nhân viên" class="insert input w200" />
                     </div>
                     <div class="fleft mleft30">
                          
                     </div>
                     <div class="fright mright5">
                         	<div id="message" class="mleft5 fleft"></div>
                            <div id="delete" class="btn fright mleft5 mright5"><span class="fleft icon icon-delete"></span><span class="fleft">Xoá</span></div>
                            <div id="refresh" class="btn fright mleft5"><span class="fleft icon icon-refresh"></span><span class="fleft">Làm mới</span></div>
                            <div id="edit" class="btn fright mleft5"><span class="fleft icon icon-edits"></span><span class="fleft">Sửa</span></div>
                            <div id="adds" class="btn fright mleft5"><span class="fleft icon icon-add"></span><span class="fleft">Thêm mới</span></div>
                            
                            <div id="search" class="btn fright mleft5 "><span class="fleft icon icon-search"></span><span class="fleft">Tìm kiến</span></div> 
                     </div>
                 </div><!--E Row-->
                 <div class="clear"></div>
            </div>
            <div id="gridview" class="fleft w100pt" >
				<table class="resultset" id="grid"></table>
            </div>
            <div class="fleft" id="paging"></div>
            <div class="clear"></div>
		</div>